package com.sky.mapper;

import com.sky.entity.OrderDetail;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface OrderDetailMapper {
    void insertBatch(List<OrderDetail> orderDetails);

    /**
     * 查询订单明细列表
     *
     * @param id
     * @return
     */
    List<OrderDetail> list(Long id);

    /**
     * 根据订单id查询订单明细
     * @param id
     * @return
     */
    @Select("select * from order_detail where order_id = #{id}")
    List<OrderDetail> getByOrderId(Long id);
}
